{% extends 'base.html' %}
{% block content %}
  <h2 class="mb-4 fw-bold text-center" style="letter-spacing:2px;">投票主题列表</h2>
  <div class="row g-4">
    {% for theme in config.themes %}
      <div class="col-md-6">
        <div class="card shadow-sm h-100">
          <div class="card-body">
            <h5 class="card-title">{{ theme.title }}</h5>
            <p class="card-text text-muted small">{{ theme.description }}</p>
            <div class="mb-2">
              <span class="badge bg-secondary">共 {{ theme.rounds|length }} 轮</span>

            </div>
            <a href="{{ url_for('theme_detail', theme_id=theme.id) }}" class="btn btn-primary btn-sm rounded-pill px-4">进入主题</a>
          </div>
        </div>
      </div>
    {% endfor %}
  </div>
{% endblock %}
